package a06demo6;

public class test78 {
    public static void main(String[] args) {
        Rabbit r = new Rabbit("小白",1);
        r.eat();
        System.out.println(r.getName()+","+r.getAge());

        Dog d = new Dog("小黄",2);
        d.eat();
        d.swim();
        System.out.println(d.getName()+","+d.getAge());

        Frog f = new Frog("小绿",1);
        f.eat();
        f.swim();
        System.out.println(f.getName()+","+f.getAge());
    }
}
